// 组件中文配置
import zhCN from 'antd/es/locale/zh_CN'
import { ConfigProvider } from 'antd'
import moment from 'moment'
import 'moment/locale/zh-cn'


import React from 'react';
import ReactDOM from 'react-dom';
// 引入样式
import './index.css';
// 引入App 组件
import App from './App';
// 引入路由  
import { HashRouter, BrowserRouter } from 'react-router-dom'
// 引入store
import store from './store';
// 引入 cretatContext 
import { createContext } from 'react'
const ContextAPI = createContext();

// 配置中文化
moment.locale('zh-cn')




ReactDOM.render(
  <BrowserRouter>
    {/* 组件中文配置 */}
    <ConfigProvider locale={zhCN}>
      <ContextAPI.Provider value={store}>
        <App />
      </ContextAPI.Provider>
    </ConfigProvider>
  </BrowserRouter>
  ,
  document.getElementById('root')
);

export { ContextAPI }


